home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
envprt
/
hpenv.frm
< prev
next >
Wrap
Text File
|
1995-05-08
|
17KB
|
702 lines
VERSION 2.00
Begin Form Form1
BackColor = &H00C0C0C0&
Caption = "Envelope Printer"
ClientHeight = 4500
ClientLeft = 915
ClientTop = 2040
ClientWidth = 7830
Height = 5190
Icon = HPENV.FRX:0000
Left = 855
LinkMode = 1 'Source
LinkTopic = "Form1"
ScaleHeight = 4500
ScaleWidth = 7830
Top = 1410
Width = 7950
Begin TextBox Addresse6
BorderStyle = 0 'None
Height = 380
Left = 120
TabIndex = 8
Top = 3720
Width = 4695
End
Begin TextBox Addresse5
BorderStyle = 0 'None
Height = 380
Left = 1080
TabIndex = 7
Top = 3000
Width = 4695
End
Begin CommandButton Command2
Caption = "&Clear"
Height = 380
Left = 6360
TabIndex = 10
Top = 2760
Width = 975
End
Begin TextBox Addresse4
BorderStyle = 0 'None
Height = 380
Left = 1080
TabIndex = 6
Top = 2640
Width = 4695
End
Begin CommandButton PrintButton
Caption = "&Print"
Height = 380
Left = 6360
TabIndex = 9
Top = 2280
Width = 975
End
Begin TextBox Addresse3
BorderStyle = 0 'None
Height = 380
Left = 1080
TabIndex = 5
Top = 2280
Width = 4695
End
Begin TextBox Addresse2
BorderStyle = 0 'None
Height = 380
Left = 1080
TabIndex = 4
Top = 1920
Width = 4695
End
Begin TextBox Addresse1
BorderStyle = 0 'None
Height = 380
Left = 1080
TabIndex = 3
Top = 1560
Width = 4695
End
Begin PictureBox Picture1
BackColor = &H0000FFFF&
Height = 980
Left = 6000
Picture = HPENV.FRX:0302
ScaleHeight = 945
ScaleWidth = 1065
TabIndex = 0
TabStop = 0 'False
Top = 240
Width = 1095
Begin Label Label1
Alignment = 1 'Right Justify
BackColor = &H0000FFFF&
Caption = "29ó"
Height = 260
Left = 360
TabIndex = 1
Top = 600
Width = 615
End
Begin Label Label2
Alignment = 1 'Right Justify
BackColor = &H0000FFFF&
Caption = "USA"
Height = 260
Left = 600
TabIndex = 2
Top = 360
Width = 375
End
End
Begin Label PrinterLabel
Alignment = 2 'Center
BackColor = &H00FFFF00&
BorderStyle = 1 'Fixed Single
ForeColor = &H00000000&
Height = 380
Left = 5160
TabIndex = 15
Top = 3720
Width = 2295
End
Begin Label R4
BackColor = &H00404040&
ForeColor = &H00FFFFFF&
Height = 260
Left = 240
TabIndex = 14
Top = 840
Width = 3135
End
Begin Label R3
BackColor = &H00404040&
ForeColor = &H00FFFFFF&
Height = 260
Left = 240
TabIndex = 13
Top = 600
Width = 3135
End
Begin Label R2
BackColor = &H00404040&
ForeColor = &H00FFFFFF&
Height = 260
Left = 240
TabIndex = 12
Top = 360
Width = 3135
End
Begin Label R1
BackColor = &H00404040&
Caption = "No Return Address"
ForeColor = &H00FFFFFF&
Height = 260
Left = 240
TabIndex = 11
Top = 120
Width = 3135
End
Begin Menu ByeBye
Caption = "&Quit"
End
Begin Menu RAMenu
Caption = "&Return Address"
End
Begin Menu SelectPrinter
Caption = "&Select Printer"
Begin Menu HPSelect
Caption = "&HP Laserjet"
End
Begin Menu IBMSelect
Caption = "&IBM ProPrinter"
End
Begin Menu PrintPrt
Caption = "Printer Port"
Begin Menu Port1
Caption = "LPT1"
End
Begin Menu Port2
Caption = "LPT2"
End
End
End
Begin Menu AboutBox
Caption = "&About"
End
End
Dim address1 As String
Dim address2 As String
Dim address3 As String
Dim address4 As String
Dim address5 As String
Dim address6 As String
Dim Raddress1 As String
Dim Raddress2 As String
Dim Raddress3 As String
Dim Raddress4 As String
Sub AboutBox_Click ()
cr$ = Chr$(13) + Chr$(10)
TheMessage$ = "HP Envelope Printer" + cr$
TheMessage$ = TheMessage$ + "⌐1991 Federal Hill Software" + cr$
TheMessage$ = TheMessage$ + "" + cr$
TheMessage$ = TheMessage$ + "This little utility prints a standard" + cr$
TheMessage$ = TheMessage$ + "No. 10 envelope on an" + cr$
TheMessage$ = TheMessage$ + "HP LaserJet II or IBM ProPrinter." + cr$ + "" + cr$
TheMessage$ = TheMessage$ + "First, Select Your Printer." + cr$
TheMessage$ = TheMessage$ + "Then fill in the address boxes and click Print." + cr$
TheMessage$ = TheMessage$ + "No fuss, no muss, no sticky mess. Enjoy!" + cr$
TheStyle = 48
TheTitle$ = "HP Envelope Printer"
MsgBox TheMessage$, TheStyle, TheTitle$
End Sub
Sub Addresse1_GotFocus ()
Addresse1.backcolor = QBColor(14)
End Sub
Sub Addresse1_KeyDown (KeyCode As Integer, Shift As Integer)
If KeyCode = KEY_DOWN Then
KeyCode = 0
SendKeys "{TAB}"
GoTo done
End If
If KeyCode = KEY_UP Then
KeyCode = 0
SendKeys "+({TAB})"
GoTo done
End If
done:
End Sub
Sub Addresse1_KeyPress (keyascii As Integer)
If keyascii = 13 Then
keyascii = 0
SendKeys "{TAB}"
End If
End Sub
Sub Addresse1_LostFocus ()
Addresse1.backcolor = QBColor(15)
End Sub
Sub Addresse2_GotFocus ()
Addresse2.backcolor = QBColor(14)
End Sub
Sub Addresse2_KeyDown (KeyCode As Integer, Shift As Integer)
If KeyCode = KEY_DOWN Then
KeyCode = 0
SendKeys "{TAB}"
GoTo done2
End If
If KeyCode = KEY_UP Then
KeyCode = 0
SendKeys "+({TAB})"
GoTo done2
End If
done2:
End Sub
Sub Addresse2_KeyPress (keyascii As Integer)
If keyascii = 13 Then
keyascii = 0
SendKeys "{TAB}"
End If
End Sub
Sub Addresse2_LostFocus ()
Addresse2.backcolor = QBColor(15)
End Sub
Sub Addresse3_GotFocus ()
Addresse3.backcolor = QBColor(14)
End Sub
Sub Addresse3_KeyDown (KeyCode As Integer, Shift As Integer)
If KeyCode = KEY_DOWN Then
KeyCode = 0
SendKeys "{TAB}"
GoTo done3
End If
If KeyCode = KEY_UP Then
KeyCode = 0
SendKeys "+({TAB})"
GoTo done3
End If
done3:
End Sub
Sub Addresse3_KeyPress (keyascii